package com.dex4d.ui.mine.activity;

import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.dex4d.R;
import com.dex4d.model.User;
import com.dex4d.ui.wallet.activity.GenerateMnemonicActivity;

import java.util.List;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * Created by chengyuchun on 2018/11/5.
 */
public class ExportMnemonicActivity  extends GenerateMnemonicActivity {
    @BindView(R.id.tv_remind1)
    TextView tv_remind1;

    @BindView(R.id.tv_remind_later)
    TextView tv_remind_later;

    @BindView(R.id.btn_continue)
    Button btn_continue;

    @Override
    protected void initVariables() {
        tv_remind1.setVisibility(View.GONE);
        tv_remind_later.setVisibility(View.GONE);
        btn_continue.setText(getString(R.string.confirm));
    }

    @Override
    protected void getMnemonic() {
        final List<String> mnemonicList = User.getInstance().getMnemonic();
        mCommonAdapter.getDatas().clear();
        mCommonAdapter.getDatas().addAll(mnemonicList);
        mCommonAdapter.notifyDataSetChanged();
    }

    @OnClick(R.id.btn_continue)
    public void onViewClick() {
        User.getInstance().setBackup(true);
        User.getInstance().save();
        finish();
    }
}
